<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="fp141670">gp_resgroup_status_per_segment</title>
  <body>
    <p>The <codeph>gp_toolkit.gp_resgroup_status_per_segment</codeph> view allows administrators
      to see current memory and CPU usage and allocation for each resource group on a
      per-host and per-segment basis.</p>
    <p>Memory amounts are specified in MBs.</p>
      <note>The <codeph>gp_resgroup_status_per_segment</codeph> view is valid only when resource
        group-based resource management is active.</note>
    <table id="fp141982">
      <title>gp_toolkit.gp_resgroup_status_per_segment</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="114pt"/>
        <colspec colnum="2" colname="col2" colwidth="66pt"/>
        <colspec colnum="3" colname="col3" colwidth="133.5pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1">
              <codeph>rsgname</codeph>
            </entry>
            <entry colname="col2">name</entry>
            <entry colname="col3">pg_resgroup.rsgname</entry>
            <entry colname="col4">The name of the resource group.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>groupid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_resgroup.oid</entry>
            <entry colname="col4">The ID of the resource group.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>hostname</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3">gp_segment_configuration.hostname</entry>
            <entry colname="col4">The hostname of the segment host.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>segment_id</codeph>
            </entry>
            <entry colname="col2">smallint</entry>
            <entry colname="col3">gp_segment_configuration.content</entry>
            <entry colname="col4">The content ID for a segment instance on the
              segment host.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>cpu</codeph>
            </entry>
            <entry colname="col2">numeric</entry>
            <entry colname="col3"/>
            <entry colname="col4">The real-time, per-segment instance CPU core usage by the resource
              group on the host. The value is the sum of the percentages (as a decimal value) of the
              CPU cores that are used by the resource group for the segment instance.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>memory_used</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The real-time memory usage of the resource group for
              the segment instance on the host. This total includes resource group
              fixed and shared memory. It also includes global shared memory used by
              the resource group.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>memory_available</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The unused fixed and shared memory for the resource
              group for the segment instance on the host.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>memory_quota_used</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The real-time fixed memory usage for the resource group
              for the segment instance on the host.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>memory_quota_available</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The fixed memory available to the resource group for
              the segment instance on the host.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>memory_shared_used</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The group shared memory used by the resource
              group for the segment instance on the host.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>memory_shared_available</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"></entry>
            <entry colname="col4">The amount of group shared memory available
              for the segment instance on the host. Resource group global shared memory
              is not included in this total.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
